package com.tan.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tan.pojo.Menu;
import com.tan.pojo.Role;
import com.tan.pojo.User;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tan.pojo.vo.UserInnerDepartmentVO;

import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author tanRuYi
 * @since 2021-08-25
 */
public interface IUserService extends IService<User> {

    Page<UserInnerDepartmentVO> getUserByUserByPage(UserInnerDepartmentVO user, Page page);

    /**
     * 导出用户Excel
     */
    void exportUserExcel(HttpServletResponse response, List<User> tbUsers) throws IOException;

    String login(String username, String password);

    User findUserByName(String username);

    List<Role> findRolesById(Long id);

    List<Menu> findMenuByRoles(List<Role> roles);
}
